<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{$Think.config.site.title} - 订单管理</title>
    <meta name="keywords" content="{$Think.config.site.keywords}">
    <meta name="description" content="{$Think.config.site.description}">
    <link href="{$Think.config.site.resource_url}css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/plugins/iCheck/custom.css" rel="stylesheet">
     <!-- Data Tables -->
    <link href="{$Think.config.site.resource_url}css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/animate.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/style.css?v=4.1.0" rel="stylesheet">
</head>
<style type="text/css">
    .table .btn{ padding: 2px 6px; border:0px;}
    .onbtn{ cursor:pointer }
</style>
<body >
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
            <style type="text/css">.col-sm-12 label{ font-weight:300; }</style>
                <div class="ibox float-e-margins">
                    <div class="">
                        <h5>{:lang('订单记录')}</h5>
                    </div>
                    <div class="row ibox-title">
                    <form action="" method="get" name="payjilu" role="form">
                        <label >{:lang('订单号')}:</label>
                        <label ><input type="text" class="input-sm form-control" name="order_no" aria-controls="" placeholder="{:lang('输入')}{:lang('订单号')}" value="{$orderno ? $orderno : '';}"></label>　　　
                        <label >{:lang('代理商名称')}:</label>
                        <label ><input type="text" class="input-sm form-control" aria-controls="" name="name" placeholder="{:lang('输入')}{:lang('代理商名称')}" value="{$name ? $name : '';}"></label>
                        <label><button type="submit" class="btn btn-sm btn-primary"> {:lang('提交')}</button> </label>
                        </form>
                    </div>
                    <div class="ibox-content">

                        <table class="table table-hover" id="listtable">
                            <thead>
                                <tr>
                                    <th>{:lang('代理商名称')}</th>
                                    <th>{:lang('版本名称')}</th>
                                    <th>{:lang('版本号')}</th>
                                    <th>{:lang('订单号')}</th>
                                    <th>{:lang('支付单号')}</th>
                                    <th>{:lang('是否免费')}</th>
                                    <th>{:lang('应付金额')}</th>
                                    <th>{:lang('实付金额')}</th>
                                    <th>{:lang('支付状态')}</th>
                                    <th>{:lang('交易时间')}</th>
                                    <th>{:lang('操作')}</th>
                                </tr>
                            </thead>
                            <tbody>
                            {volist name="list" id="v"}
                                <tr data-id="{$v.id}">
                                    <td>{$v.name}</td>
                                    <td>{$v.vname}</td>
                                    <td>{$v.vision}</td>
                                    <td>{$v.order_no}</td>
                                    <td>{$v.trade_no}</td>
                                    <td>{if condition="$v['free'] eq 1"} <p class="btn btn-primary " type="button"><i class="fa fa-check"></i> {:lang('免费')} </p> {else /} <p class="btn btn-warning " type="button"><i class="fa fa-warning"></i> {:lang('付费')} </p> {/if}</td>
                                    <td><span class="btn btn-outline btn-warning">{$v.payable_amount}</span></td>
                                    <td><span class="btn btn-outline btn-danger">{$v.real_amount}</span></td>
                                    <td>
                                        {switch name="v.pay_status"}
                                            {case value="0"}<p class="btn btn-danger"><i class="fa fa-warning"></i> {:lang('未支付')} </p>{/case}
                                            {case value="1"}<p class="btn btn-primary " type="button"><i class="fa fa-check"></i> {:lang('已支付')} </p>{/case}
                                        {/switch}
                                    </td>
                                    <td>{if condition="$v['payment_date'] neq 0"}{$v.payment_date|date="Y-m-d H:i:s",###} {/if}</td>
                                    <td><span class="onbtn"><i class="fa fa-clock-o" ></i> {:lang('续费')}</span></td>
                                </tr>
                            {/volist}
                            </tbody>
                        </table>
                    </div>

                    <div class="row">
                        <div class="col-sm-6">
                            <div class="dataTables_info" id="DataTables_Table_0_info" role="alert" aria-live="polite" aria-relevant="all"></div>
                        </div>
                        <div class="col-sm-6">
                            <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
                                {$list->render()}
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
    <script src="{$Think.config.site.resource_url}js/jquery.min.js?v=2.1.4"></script>
    <script src="{$Think.config.site.resource_url}js/bootstrap.min.js?v=3.3.5"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/peity/jquery.peity.min.js"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/iCheck/icheck.min.js"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/layer/layer.js"></script>
    <!--统计代码，可删除-->
    <script type="text/javascript">
        $(function(){
            $("#listtable").on("click",".onbtn",function(){
                $editTr = $(this).closest("tr");
                var id = $editTr.data("id");
                //alert(id);
                layer_font = layer.open({
                  type: 2,
                  title: "{:lang('续费')}",
                  shadeClose: true,
                  shade: 0.8,
                  area: ['50%', '100%'],
                  content: '/ausadmin/Order/renew?id='+id //iframe的url
                });

            });

        });
    </script>
</body>

</html>
